home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 43 / Mac Magazin and MacEasy Magazine CD - Issue 43.iso / Software / Entwickler / CCMArea / Source / CCMWindow.cp < prev    next >
Encoding:
Text File  |  1997-12-22  |  1.2 KB  |  65 lines  |  [TEXT/CWIE]

  1. // CCMArea version 1.3
  2. // 11-11-97
  3. // by David Catmull
  4.  
  5. /* History:
  6.     
  7.     9-19-97        First version
  8.     
  9.     10-6-97        Added sCloseStringID and SetCloseStringID
  10.     
  11.     10-16-97    Checks status if cmd_Close instead of goAwayFlag
  12.     
  13.     10-20-97    Got rid of Click and AdjustCursorSelf
  14.     
  15.     10-22-97    Added check for winAttr_regular
  16.     
  17.     11-11-97    Moved sCloseStringID to UCMArea::sCmdStringID
  18.     
  19.     12-18-97    Updated to use UCMArea::AppendMenuCommand
  20.     
  21.     12-22-97    Added GetSelectionDesc
  22. */
  23.  
  24. #include "CCMWindow.h"
  25. #include "UCMArea.h"
  26. #include <Appearance.h>
  27.  
  28. CCMWindow::CCMWindow(LStream *inStream)
  29.     : LWindow(inStream)
  30. {
  31. }
  32.  
  33. void
  34. CCMWindow::ClickSelf(const SMouseDownEvent &inMouseDown)
  35. {
  36.     CMClick(inMouseDown);
  37. }
  38.  
  39. void
  40. CCMWindow::BuildMenuSelf(MenuHandle inMenu)
  41. {
  42.     if (HasAttribute(windAttr_Regular)) {
  43.         Boolean enabled,usesMark;
  44.         Char16 mark;
  45.         Str255 name;
  46.         
  47.         LCommander::GetTarget()->ProcessCommandStatus(cmd_Close,enabled,usesMark,mark,name);
  48.         
  49.         if (enabled) {
  50.             Str255 closeString;
  51.             
  52.             ::GetIndString(closeString,UCMArea::GetCmdStringID(),1);
  53.             UCMArea::AppendMenuCommand(inMenu,closeString,cmd_Close);
  54.         }
  55.     }
  56. }
  57.  
  58. void
  59. CCMWindow::GetSelectionDesc(AEDesc &outSelDesc)
  60. {
  61.     AEDesc nullDesc = { 0,0L };
  62.     
  63.     MakeSelfSpecifier(nullDesc,outSelDesc);
  64. }
  65.